<template>
  <div class="person">
    <h2>当前求和为: {{ sum }},放大10倍后为：{{ bigSum }}</h2>
    <button @click="changeSum">点我sum+1</button>
    <hr>
    <img v-for="(dog, index) in dogList" :src="dog" :key="index">
    <br>
    <button @click="addDog">点我添加一直狗狗</button>
  </div>
</template>
<script lang="ts" setup name="person">
// 将封装好的模块引入
import useDog from '@/hooks/useDog';
import useSum from '@/hooks/useSum';
  //  使用结构定义方法和变量
  let {sum,changeSum,bigSum} = useSum()
  let {dogList,addDog} = useDog()
</script>
<style>
button {
  margin-left: 10px;
}

img {
  height: 100px;
  margin-right: 10px;
}
</style>